Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Change the inner structure of DateTime #267

Merged

Conversation

sorairolake
Copy link
Contributor

Hold the values ​​as packed date and packed time. This is the same as MS-DOS date and time which is the time representation in ZIP. Note that the second resolution is changed to 2 seconds.

This change reduces the size of DateTime from 8 bytes to 4 bytes.

mem::size_of mem::align_of
Before 8 2
After 4 2

@sorairolake sorairolake force-pushed the change-datetime-inner-structure branch 4 times, most recently from 9f3845f to 06d31e0 Compare December 2, 2024 12:33
Hold the values ​​as packed date and packed time. Note that the second
resolution is changed to 2 seconds.
@sorairolake sorairolake force-pushed the change-datetime-inner-structure branch from 06d31e0 to 9f4d1b8 Compare December 25, 2024 06:16
@Pr0methean Pr0methean added this pull request to the merge queue Jan 10, 2025
Merged via the queue into zip-rs:master with commit e3eb2f7 Jan 10, 2025
39 checks passed
@sorairolake sorairolake deleted the change-datetime-inner-structure branch January 11, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants